<!-- BottomTabBar.vue -->
<template>
  <view class="tab-bar">
    <button @click="tiaozhuan1('../../../coustom/pages/index/index')">打车</button>
    <button @click="tiaozhuan2('../../../pages/User/User')">个人中心</button>
  </view>
</template>

<script>
export default {
  methods: {
	  tiaozhuan1(page)
	  {
		  uni.redirectTo({
		  	url:page
		  })
	  },
    tiaozhuan2(page) {
          uni.switchTab({ // 必须使用 switchTab
			
            url: page,
            fail: (err) => {
              console.error('跳转失败', err)
            }
          })
        }
  }
}
</script>

<style scoped>
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: space-around;
  background-color: #fff;
  border-top: 1px solid #ccc;
  padding: 10px 0;
}
</style>
